#ifndef __MAX7219_H
#define __MAX7219_H


#include "app_main.h"

#define NO_OP              0x00
#define DIGIT0             0x01
#define DIGIT1             0x02
#define DIGIT2             0x03
#define DIGIT3             0x04
#define DIGIT4             0x05
#define DIGIT5             0x06
#define DIGIT6             0x07
#define DIGIT7             0x08
#define DECODE_MODE        0x09
#define INTENSITY          0x0A
#define SCAN_LIMIT         0x0B
#define SHUT_DOWN          0x0C
#define DISPLAY_TEST       0x0F
/* mode define */
#define NORMAL_MODE           0
#define NO_DECODE_D0_D7    0x00
#define DECODE_D0_ONLY     0x01
#define DECODE_D0_D3_ONLY  0x0F
#define DECODE_D0_D7       0xFF


extern uint8_t code_disp1[38][8];

void max7219_init(void);

void max7219_show(void);























#endif



